package no.sachmuld.methodcombination.examples.reflection.closstandardstyle;

import no.sachmuld.methodcombination.api.MethodInvocation;

/**
 *
 */
public class FooX extends Foo {

    FooX() {
        with(new FooBehaviour() {

            @Override
            public String aroundBar(int i, MethodInvocation<String> methodInvocation) {
                System.out.println("FooX.aroundBar(" + i + ")");
                return methodInvocation.proceed();
            }

            @Override
            public void beforeBar(int i) {
                System.out.println("FooX.beforeBar");
            }

            @Override
            public String bar(int i, MethodInvocation<String> methodInvocation) {
                System.out.println("FooX.bar(" + i + ")");
                return "FooX";
            }

            @Override
            public void afterBar(int i) {
                System.out.println("FooX.afterBar");
            }

        });
    }
}

